#include "widget.h"
#include "one.h"
#include "two.h"
#include <QStackedLayout>
#include <QPushButton>
#include <QVBoxLayout>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
{
    setFixedSize(800, 480);
        one = new One;
        two = new Two;

        stackLayout = new QStackedLayout;
        stackLayout->addWidget(one);
        stackLayout->addWidget(two);

        connect(one, &One::display, stackLayout, &QStackedLayout::setCurrentIndex);
        connect(two, &Two::display, stackLayout, &QStackedLayout::setCurrentIndex);

        mainLayout = new QVBoxLayout;
        mainLayout->addLayout(stackLayout);
        setLayout(mainLayout);
}

Widget::~Widget()
{
}

